cap log close
log using "$logs/cr-bias.log", replace

use "$data/iat", clear

// Pooled & Teacher only
foreach var in imp exp {
	xtmixed `var'licitbias || countyid:
	predict all_co_`var'bias if e(sample), fitted
	xtmixed `var'licitbias if k12==1 || countyid:
	predict tch_co_`var'bias if e(sample), fitted
	}
	
	collapse (firstnm) *bias*, by(countyid) 
	drop implicitbias explicitbias
	save "$data/bias_data", replace
	
log close
